<?php  
class ControllerModuleTntSlideshow extends Controller {
	protected function index($setting) {
		$this->load->model('tool/image');
		$this->data['width'] = $setting['size_width'];
		$this->data['height'] = $setting['size_height'];

		$this->data['code'] = $this->config->get('tnt_slideshow_code');
		$img_exp = explode(",",$this->config->get('tnt_slideshow_code'));
		for($i = 0;$i<=count($img_exp)-1;$i++){
			$this->data['imgs'][] = array(
				'image' => $this->model_tool_image->resize($img_exp[$i],980,350),
				'thumb' => $this->model_tool_image->resize($img_exp[$i],96,46)
			);					
		}
		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/tnt_slideshow.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/module/tnt_slideshow.tpl';
		} else {
			$this->template = 'default/template/module/tnt_slideshow.tpl';
		}
		
		$this->render();
	}
}
?>